home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PCMania 39
/
PCMania CD39_3.iso
/
multi
/
artgall
/
artg.dxr
/
00131_Script_old code
< prev
Wrap
Text File
|
1995-10-05
|
2KB
|
105 lines
-- Shared Cast ons for entire CD
--hilite on
on pressOn
puppetSound 0
set whichSprite = the clickOn
puppetSPRITE whichSprite,true
global lastClickOn
set lastClickOn = whichSprite
set the locV of sprite whichSprite to (the locV of sprite whichSprite) + 4
PUPPETSOUND "clickSound"
puppetTransition 0
updateStage
repeat while the stillDown
if rollOver(whichSprite) then
else
set the locV of sprite whichSprite to (the locV of sprite whichSprite) - 4
--set the locV of sprite 4 to 500
PUPPETSOUND "clickSound"
updateStage
puppetSPRITE whichSprite,false
puppetTransition 0
updateStage --force button rebound before playOrGo call
exit
end if
end repeat
set the locV of sprite whichSprite to (the locV of sprite whichSprite) - 4
--set the locV of sprite 4 to 500
PUPPETSOUND "clickSound"
puppetSPRITE whichSprite,false
puppetTransition 0
updateStage
updateStage --force button rebound before playOrGo call with extra update
--score script takes over here
puppetSound 0
end pressOn
-- time delay utility
on waitFor seconds
set now = the timer
repeat while the timer < (now + (seconds * 60))
if the mousedown then exit
end repeat
end waitFor
--
on waitFordep seconds
set now = the timer
repeat while the timer < (now + (seconds * 60))
nothing
end repeat
end
--
on tmwaitFor seconds
set now = the timer
repeat while the timer < (now + (seconds * 60))
if the mousedown then exit
end repeat
end
-- sound delay
on tmwaitSound thisone
repeat while soundbusy(1)
updatestage
if the mousedown then exit
end repeat
end
-- sound delay
--on waitSound thisone
-- repeat while soundbusy(1)
-- updatestage
-- if the mousedown then exit
-- end repeat
--
on waitSound thisone
updatestage
if soundbusy(1) = FALSE then go to the frame +1
else go to the frame
end
-- utility
on upperCase s
set r = EMPTY
set len = length( s )
repeat with i = 1 to len
set c = chars( s, i, i )
if charToNum( c ) >= 97 AND charToNum( c ) <= 122 then ¼
set c = numToChar( charToNum( c ) - 32 )
set r = r & c
end repeat
return r
end